package com.bugs.activiti3;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngineConfiguration;
import org.activiti.engine.ProcessEngines;
import org.junit.Test;
import org.junit.runner.RunWith;

public class CreateTable {

    /**
     * 生成表结构
     */
    @Test
    public void test01(){
        // 调用 classpath 下的 avtiviti.cfg.xml 中的配置 生成对应的表结构
        ProcessEngine defaultProcessEngine = ProcessEngines.getDefaultProcessEngine();
        System.out.println(defaultProcessEngine);

//        //创建ProcessEngineConfiguration
//        ProcessEngineConfiguration configuration =ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("Activiti.cfg.xml");
//        //通过ProcessEngineConfiguration创建ProcessEngine，此时会创建数据库
//        ProcessEngine processEngine =configuration.buildProcessEngine();
//        System.out.println(processEngine);

    }
}